package edu.sdibt;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class CharStreamTest {

	public static void main(String[] args) {
		try (FileReader fr=new FileReader("E:\\zxr\\1.txt");
				FileWriter fw =new FileWriter("E:\\zxr1\\2.txt")){
			char[] buffer = new char[1024];
			while(fr.read(buffer)!=-1) {
				fw.write(buffer);
				fw.flush();
			}

		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		
	}
}
